Import mojo

Class TColor

	Private
	Field r:Int
	Field g:Int
	Field b:Int
	Field a:Int
	
	Public
	
	Method New()
		Self.r = 0
		Self.g = 0
		Self.b = 0
		Self.a = 255
	End Method
	
	Method R:Int() 
		Return Self.r
	End Method
	
	Method R:Void(r:Int) 
		Self.r = r
	End Method
	
	Method G:Int() 
		Return Self.g
	End Method
	
	Method G:Void(g:Int) 
		Self.g = g
	End Method
	
	Method B:Int() 
		Return Self.b = b
	End Method
	
	Method B:Void(b:Int) 
		Self.b = b
	End Method
	
	Method A:Int() 
		 Return Int(Self.a)
	End Method
	
	Method A:Void(a:Int) 
		Self.a = a
	End Method
	
	Method Set(r:Int=255,g:Int=255,b:Int=255,a:Int=255)
		Self.r = r
		Self.g = g
		Self.b = b
		Self.a = a
	End
	
	Method Apply:Void()
		SetAlpha(Self.a/255)
		SetColor(Self.r,Self.g,Self.b)
	End Method
	
	Method WHITE:Void()
		Self.Set(255,255,255)
		Self.Apply()
	End
	
	Method YELLOW:Void()
		Self.Set(255,255,0)
		Self.Apply()
	End
	
	Method RED:Void()
		Self.Set(255,0,0)
		Self.Apply()
	End
	
	Method GRAY:Void()
		Self.Set(128,128,128)
		Self.Apply()
	End
	
	Method GREEN:Void()
		Self.Set(0,255,0)
		Self.Apply()
	End
	
	Method BLUE:Void()
		Self.Set(0,0,255)
		Self.Apply()
	End
	
	Method BLACK:Void()
		Self.Set(0,0,0)		
		Self.Apply()
	End
	
	Method ToString:String()
		Return Self.r+","+Self.g+","+Self.b+","+Self.a
	End Method
End Class